
//保存待计划
function submitDocotr1() {
    var doctor= document.getElementById("doctorsf").value;   //医生
    var createName= document.getElementById("createName").value;  //创建人
    var revisit= document.getElementById("revisit").value;  //随访人员
    var remarks= document.getElementById("remarks2").value;   //随访内容
    var revisitContent= document.getElementById("revisitContent").value;   //随访结果
    var reservationsId= document.getElementById("reservationsId").value;   //预约id
    var customerId= document.getElementById("customerId").value;   //客户id
    var revisitTime= document.getElementById("revisitTime").value;   //随访时间
    if(revisitTime == "" || revisitTime == null){
        alert("请选择随访时间！");
        return;
    }
    if((doctor==null||doctor=="") && (revisit==null||revisit=="")){
        alert("请选择随访医生或随访人员!");
        return;
    }
    if(remarks == "" || remarks == null){
        alert("请填写随访内容！");
        return;
    }
    $.ajax({
        url: Feng.ctxPath + "/doctorLooked/addDoctorContent2",
        type: "post",
        data: {
            doctor: doctor,
            revisitTime: revisitTime,
            createName:createName,
            remarks: remarks,
            revisitContent:revisitContent,
            customerId:customerId,
            reservationsId: reservationsId,
            revisit:revisit
        },
        success: function (data) {
            Feng.success('操作成功!');
            window.location.href = Feng.ctxPath + "/doctorPatientsCentral/doctorPatient_returnVisit/"+$("#reservationsId").val();
        },
        error: function (data) {

        }
    });
}

//完成回访
function submitDocotr2() {
    var doctor= document.getElementById("doctorsf").value;   //医生
    var createName= document.getElementById("createName").value;  //创建人
    var revisit= document.getElementById("revisit").value;  //随访人员
    var remarks= document.getElementById("remarks2").value;   //随访内容
    var revisitContent= document.getElementById("revisitContent").value;   //随访结果
    var reservationsId= document.getElementById("reservationsId").value;   //预约id
    var customerId= document.getElementById("customerId").value;   //客户id
    var revisitTime= document.getElementById("revisitTime").value;   //随访时间
    if(revisitTime == "" || revisitTime == null){
        alert("请选择随访时间！");
        return;
    }
    if((doctor==null||doctor=="") && (revisit==null||revisit=="")){
        alert("请选择随访医生或随访人员!");
        return;
    }
    if(remarks == "" || remarks == null){
        alert("请填写随访内容！");
        return;
    }
    if(revisitContent == "" || revisitContent == null){
        alert("请填写随访结果！");
        return;
    }
    $.ajax({
        url: Feng.ctxPath + "/doctorLooked/addDoctorContent3",
        type: "post",
        data: {
            doctor: doctor,
            revisitTime: revisitTime,
            createName:createName,
            remarks: remarks,
            revisitContent:revisitContent,
            customerId:customerId,
            reservationsId: reservationsId,
            revisit:revisit
        },
        success: function (data) {
            Feng.success('操作成功!');
            window.location.href = Feng.ctxPath + "/doctorPatientsCentral/doctorPatient_returnVisit/"+$("#reservationsId").val();
        },
        error: function (data) {

        }
    });
}

function patient_backHome () {  ////点击返回跳转页面 - 首页
    window.location.href = Feng.ctxPath + "/weixin/index";
}